package yourobot.bonus;

import java.util.Random;
/**
 * 
 * @author mehdimasrour
 *
 */
public class BonusFactory {

	/**
	 * 
	 * @return a new random bonus
	 */
	public static Bonus newBonus(){
		Random r = new Random(System.nanoTime());
		int i = r.nextInt(3);
		switch (i){
		 case 0:
			 return new Bomb();
			 
		 case 1:
			 return new Leurre();
			 
		 case 2:
			 return new Snap();
			 
		}
		return null;
	}
}
